// In a Renderer process file
import { readFileSync } from 'node:fs'
import { ipcRenderer } from 'electron'

// Node.js
const content = readFileSync('foo.txt', 'utf8')

// Electron
ipcRenderer.send('foo', 'arg1')


const open = () => {
    ipcRenderer.send('message', 12321)
   }